package com.zimmur.app.mocolink.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zimmur.app.mocolink.dao.GroupSceneMapper;
import com.zimmur.app.mocolink.domain.model.GroupScene;
import com.zimmur.app.mocolink.domain.vo.GroupSceneVo;
import com.zimmur.app.mocolink.service.IGroupSceneService;

@Service
public class GroupSceneServiceImpl implements IGroupSceneService {

	@Autowired
	private GroupSceneMapper groupSceneMapper;

	@Override
	public List<GroupSceneVo> getAllScene() {
		return groupSceneMapper.selectAllScene();
	}

	@Override
	public GroupScene selectById(Integer sceneId) {
		return groupSceneMapper.selectByPrimaryKey(sceneId);
	}

	@Override
	public int update(GroupScene groupScene) {
		return groupSceneMapper.updateByPrimaryKeySelective(groupScene);
	}

	@Override
	public int add(GroupScene groupScene) {
		return groupSceneMapper.insertSelective(groupScene);
	}

	@Override
	public int delete(Integer sceneId) {
		return groupSceneMapper.deleteByPrimaryKey(sceneId);
	}

}
